﻿<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="configshop_itemlist.aspx.cs"
    Inherits="map.member.configshop_itemlist" Title="无标题页" %>

<%@ Register Assembly="RuleCode.Common" Namespace="RuleCode.Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        *
        {
            font-size: small;
            margin: 0;
            padding: 0;
        }
    </style>                                                          
    <script type="text/javascript">
    window.onload=function(){
         ajst();
    }
    function ajst(){ 
//        self.parent.adjustFrameHeight(document.body.clientHeight,
//        self.window.frameElement.id,
//        self.parent.document.getElementById(self.window.frameElement.id).parentNode.parentNode.id
//        );

        var parentWindowPNode = parent.document.getElementById(self.window.frameElement.id).parentNode.parentNode;
        var frameObj = parent.document.getElementById(window.frameElement.id);
        var frmheight = (document.body.clientHeight);   
        frameObj.style.height = frmheight +10+ "px";               
    }
    function dispinlist(){ 
        document.getElementById('divlist').style.display = 'block';          
        document.getElementById('divpicture').style.display = 'none';
        ajst();
    }
    function dispinpic(){ 
        document.getElementById('divpicture').style.display = 'block';
        document.getElementById('divlist').style.display = 'none';  
        ajst();  
    }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Literal ID="Literalcss" runat="server"></asp:Literal>
<table style="width:100%;margin-top:10px;" border="0" cellpadding="0" cellspacing="0"  >
 <tr>
  <td  class="titlediv">
    <div class="title">
        <b>商品列表</b>
    </div>
    <a href="#" onclick="dispinlist();">以目录方式显示</a> | <a href="#" onclick="dispinpic(); ">
        橱窗显示</a>
    <div id="divlist" style="width: 100%; display:none;">
        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>--%>
                <asp:DataList ID="DataList1" runat="server" Width="100%" DataKeyField="RECID">
                    <ItemTemplate>
                        <table id="producttable" width="100%" style ="border:solid 1px #F6EDED;">
                            <tr>
                                <td style="width: 60px">
                                    <asp:Image ID="Image2" runat="server" ImageUrl='<%#Eval("taobaopic_path")%>' Width="60px"
                                        Height="60px" />
                                </td>
                                <td style="vertical-align: top; width: 160px;">
                                    <table style="width: 100%; height: 60px">
                                        <tr>
                                            <td style="vertical-align: top;">
                                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# RuleCode.Table.taobaouseritems.getitemlinkstringcbw(Eval("taobaoiid").ToString()) %>'
                                                    Target="_parent"><%#RuleCode.zfunction.CutString(Eval("taobaotitle").ToString(), 60, "..")%></asp:HyperLink>
                                            </td>
                                        </tr>
                                        
                                    </table>
                                </td>
                                <td style="width: 50px;">
                                    <%#Eval("taobaoprice")%>
                                </td>
                                <td style="width: 40px;">
                                    <%#Eval("taobaocity")%>
                                    <%#Eval("taobaostate")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
                <cc1:WebPager ID="WebPager1" runat="server" ControlToPaginate="DataList1" PageSize="12"
                    OnPageIndexChanged="WebPager1_PageIndexChanged" />
           <%-- </ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
    <div id="divpicture" style="width: 100%; display: block;">
        <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>--%>
                <asp:DataList ID="DataList2" runat="server" Width="100%" DataKeyField="RECID" RepeatColumns="4">
                    <ItemTemplate>
                        <table style ="border:solid 1px #F6EDED;">
                            <tr>
                                <td>
                                <a href="<%# RuleCode.Table.taobaouseritems.getitemlinkstringcbw(Eval("taobaoiid").ToString()) %>" 
                                target="_parent" style ="text-decoration:none;">
                                <img src="<%#Eval("taobaopic_path")%>"  style="border:0; width:150px; height:150px;"/>
                                </a>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# RuleCode.Table.taobaouseritems.getitemlinkstringcbw(Eval("taobaoiid").ToString()) %>'
                                        Target="_parent"><%#RuleCode.zfunction.CutString(Eval("taobaotitle").ToString(), 24, "..")%></asp:HyperLink>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%#Eval("taobaoprice")%> 
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
                <cc1:WebPager ID="WebPager2" runat="server" ControlToPaginate="DataList2" PageSize="12"
                    OnPageIndexChanged="WebPager2_PageIndexChanged" />
            <%--</ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
</td>
 </tr>
</table>
</asp:Content>
